/*
 * @Author: xiaxia
 * @Description: 
 * @Date: 2024-07-03 16:09:34
 * @LastEditTime: 2024-07-03 17:27:48
 * @FilePath: \project\src\api\product\attr\type.ts
 */
/*
 * @Author: xiaxia
 * @Description: 
 * @Date: 2024-06-28 16:05:59
 * @LastEditTime: 2024-06-28 18:04:23
 * @FilePath: \project\src\api\product\attr\type.ts
 */

export interface ResponseData {
  code: number,
  message: string,
  ok: boolean,
}

// 分类 - 返回的数据类型
export interface Category{
  id: number | string, 
  name: string,
  category1Id?: number | string,
  category2Id?: number | string,
}
export interface CategoryResponse extends ResponseData{
  data: Category[]
}

// 属性 - 返回的数据类型
export interface AttrValue{
  id?: number | string, 
  valueName: string,
  attrId?: number | string,
  flag?: boolean,
}
export type AttrValues = AttrValue[] // 属性值
export interface Attr{
  id?: number | string, 
  attrName: string,
  categoryId: number | string,
  categoryLevel: number | string,
  attrValueList: AttrValues,
}
export type Attrs = Attr[]
export interface AttrListResponse extends ResponseData{
  data: Attrs
}